<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <!-- 한글 인코딩 때문에 추가적으로 해줘야하는 부분 -->
 <%request.setCharacterEncoding("utf-8"); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>중앙 HTA</title>

<link href="./css/jhta.css" rel="stylesheet" type="text/css">
<link href="./css/effect.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href='./board/board.css'>

<style>
@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css);
#btnLogout{/*로그아웃*/
	width:80px;
	height:25px;
	margin-left:10px;
}
#btnMyInfo{/*내정보*/
	width:60px;
	height:25px;
	margin-left:3px;	
}
#btnLogout,#btnMyInfo{
	font-family: 'Nanum Gothic', sans-serif;
	border-top-right-radius:5px;
	border-bottom-right-radius:5px;
	border-top-left-radius:5px;
	border-bottom-left-radius:5px;
	font-size:15px;
	background-color:#faa719;
	border:1px solid #faa719;
	box-shadow:4px 3px 6px #dddddd;
	text-shadow:1px 1px 1px #DF7401;
	font-weight: bolder;
}
.log{
	text-shadow:1px 1px 1px #A4A4A4;
	font-weight: bolder;
}
</style>

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src='./board/board.js'></script>
<script>
function logout(){//로그아웃시 메인에 정보 초기화
	var logout2=document.getElementById("btnLogout");
	
	if(logout2!=null){
		location.href='logout.jsp';
	}
}
function MyInfo(){//내정보
	var myinfo2=document.getElementById("btnMyInfo");
	
	if(myinfo2!=null){
		location.href='index.jsp?inc_contents=regiRevice.jsp';
	}
}
</script>
</head>
<body>
<% 
//아이디 정보 가져오는 것(로그인 확인하는 것)
String sessionID=(String)session.getAttribute("mid");
%>

<%
String inc_contents = request.getParameter("inc_contents");
 if(inc_contents == null || inc_contents == ""){
	 inc_contents = "index_main.jsp";
 }
 
//게시판 파트
String part = null;

if(request.getParameter("part") !=null){
	part = request.getParameter("part");
	session.setAttribute("part", part);
	session.setAttribute("nowPage", 1);
	
}else{
	if(session.getAttribute("part") == null){
		part ="공지";
		session.setAttribute("part", part);
	}else{
		part=(String)session.getAttribute("part");
	}
}
%>
<div id="ori_main">
	<div id="main_login2">
		<%if(sessionID==null || sessionID==""){//로그인 전 %>
		<div class="log"><a href="index.jsp?inc_contents=login.jsp">로그인</a></div>&emsp;
		<div class="log"><a href="index.jsp?inc_contents=./register/register1.jsp">회원가입</a></div>
		<%}else{ //로그인 후 %>
		<font face='Nanum Gothic' size='3'><font color='#0404B4' face='Nanum Gothic' size='4'><b><%=sessionID%> </b></font>님 </font>
		<input type='button' value='내정보' id='btnMyInfo' onclick='MyInfo()'>
		<input type='button' value='로그아웃' id='btnLogout' onclick='logout()'>
		<%}%>
	</div>
	
	<div id="main_header">
		<div id="main_logo">
			<a href="./index.jsp">중앙 HTA</a>
		</div>
		
		<div id="main_menu2">
		   <ul class="menu2" style="margin-bottom: 10px;">
			   <li><a href="index.jsp?inc_contents=introduce.jsp">학원소개</a></li>
			   <li><a href="index.jsp?inc_contents=./edu/edu.jsp">교육과정</a></li>
		  	   <li><a href="index.jsp?inc_contents=photomain.jsp">포트폴리오</a></li>
		  	   <li><a href="index.jsp?inc_contents=jobtc.jsp">취업센터</a>
		  	   		<ul>
				       <li><a href="index.jsp?inc_contents=interview_list.jsp">기업체인터뷰</a></li>
				       <li><a href="index.jsp?inc_contents=./status/status.jsp">취업 현황</a>
				    </ul>
		  	   </li>
		  	   <li><a href="index.jsp?inc_contents=./board/list.jsp">게시판</a>
	  	   	   <ul>
			      <li><a href="#" onclick="goBoard('공지')">공지</a></li>
			      <li><a href="#" onclick="goBoard('자유게시판')">자유게시판</a></li>
			      <li><a href="#" onclick="goBoard('익명게시판')">익명게시판</a>
			   </ul>
		  </ul>
		</div>
	</div>
	
	<div id="main_contents">
		<jsp:include page="<%=inc_contents%>"/>
	</div>

	<div id="main_footer" style="font-size: 13px">
	<br/>
	서비스 약관/정책&emsp;|&emsp;기사제보/Press&emsp;|&emsp;광고/제휴문의&emsp;|&emsp;중앙HTA웹소개&emsp;|&emsp;중앙HTA 고객센터&emsp;|&emsp;중앙HTA 문의하기<p/><br/>
	Copyright (c) CenterHTA.com All rights reserved.<br/>
	</div>
</div>
<script>board_init();</script>
</body>
</html>